/*
 *
 *
 */

#include "gkt_window.h"
#include "window_text.h"

#if defined(GKT_CONFIG_SCREEN_ENABLE) && GKT_CONFIG_SCREEN_ENABLE

#if defined(GKT_CONFIG_WINDOW_TEXT_CHINESE_ENABLE) \
	&& GKT_CONFIG_WINDOW_TEXT_CHINESE_ENABLE
extern const char *gc_window_text_chinese_table[];
extern const uint32_t gc_window_text_chinese_table_size;
#endif
#if defined(GKT_CONFIG_WINDOW_TEXT_ENGLISH_ENABLE) \
	&& GKT_CONFIG_WINDOW_TEXT_ENGLISH_ENABLE
extern const char *gc_window_text_english_table[];
extern const uint32_t gc_window_text_english_table_size;
#endif

void window_text_init(void)
{
	uint32_t widget_select_switch_text_ids[2];

	gkt_text_set_id(GKT_TEXT_ID_NECESSARY, WINDOW_TEXT_ID_NECESSARY);
	gkt_text_set_id(GKT_TEXT_ID_MAX, WINDOW_TEXT_ID_MAX);

#if defined(GKT_CONFIG_WINDOW_TEXT_CHINESE_ENABLE) \
	&& GKT_CONFIG_WINDOW_TEXT_CHINESE_ENABLE
	gkt_text_set_table(GKT_LANG_CHINESE, 
			gc_window_text_chinese_table,
			gc_window_text_chinese_table_size);
#endif
#if defined(GKT_CONFIG_WINDOW_TEXT_ENGLISH_ENABLE) \
	&& GKT_CONFIG_WINDOW_TEXT_ENGLISH_ENABLE
	gkt_text_set_table(GKT_LANG_ENGLISH,
			gc_window_text_english_table,
			gc_window_text_english_table_size);
#endif

	widget_select_switch_text_ids[0] = WINDOW_TEXT_ID_closed;
	widget_select_switch_text_ids[1] = WINDOW_TEXT_ID_opened;
	gkt_widget_select_switch_set_text_ids(GKT_WIDGET_SELECT_SWITCH_TYPE_OPEN_CLOSE,
			widget_select_switch_text_ids);

	widget_select_switch_text_ids[0] = WINDOW_TEXT_ID_chinese;
	widget_select_switch_text_ids[1] = WINDOW_TEXT_ID_english;
	gkt_widget_select_switch_set_text_ids(GKT_WIDGET_SELECT_SWITCH_TYPE_CHINESE_ENGLISH,
			widget_select_switch_text_ids);
}

#endif


